home *** CD-ROM | disk | FTP | other *** search
- Path: solon.com!not-for-mail
- From: seebs@solutions.solon.com (Peter Seebach)
- Newsgroups: comp.lang.pl1,comp.lang.c
- Subject: Re: PL/I and C
- Date: 2 Mar 1996 10:31:49 -0600
- Organization: Usenet Fact Police (Undercover)
- Message-ID: <4h9t5l$hkk@solutions.solon.com>
- References: <4gh5ru$eng@goanna.cs.rmit.EDU.AU> <4h11ub$njp@goanna.cs.rmit.EDU.AU> <TANMOY.96Feb28085159@qcd.lanl.gov> <4h8vte$s76@goanna.cs.rmit.EDU.AU>
- NNTP-Posting-Host: solutions.solon.com
-
- In article <4h8vte$s76@goanna.cs.rmit.EDU.AU>,
- ++ robin <rav@goanna.cs.rmit.EDU.AU> wrote:
- > >How is sprintf an I/O function? It inputs its parameters and outputs
- > >into the memory pointed to by one of its parameters?
-
- >---sprint prints to memory. However, it does nothing like the
- >functions that I mentioned for centering text, and trimming given
- >characters from either or both ends of a string.
-
- You obviously don't have clue 1 about sprintf. I use sprintf regularly
- to trim characters from strings, center them inside fields of varying
- size, and do all sorts of other cool things.
-
- > sprint would appear to be comparable in intent to PUT STRING.
-
- You're forgetting the "f". Which is apparently because you lack the
- conceputal framework. sprintf-> string print *formatted*. Those formats
- are awe-inspiringly powerful.
-
- (Not to mention, it can also convert other types into strings.)
-
- Get a C book and read about *printf format strings for a while;
- pay particular attention to the * flag.
-
- -s
- --
- Peter Seebach - seebs@solon.com - Copyright 1996 Peter Seebach.
- C/Unix wizard -- C/Unix questions? Send mail for help. No, really!
- FUCK the communications decency act. Goddamned government. [literally.]
- The *other* C FAQ - http://www.solon.com/~seebs/c/c-iaq.html
-